<template>
  <div>
    <div class="jnhfxq_box">
      <div class="jnhfxq_box_title">
        {{ list.title }}
      </div>

      <div class="jnhfxq_nr_box dcjl">
        <div class="title">
          <span>开始时间：{{ list.start_time }}</span>
          <span style="margin-left: 1.2375rem"
            >结束时间：{{ list.end_time }}</span
          >
        </div>
        <div class="jnhfxq_nr_box_input" v-for="(item,index) in infolist" :key="index">
          <el-input :placeholder="'请输入'+item.name" v-model="item.ask" disabled>
            <template slot="prepend">{{item.name}}：</template>
          </el-input>
        </div>
      </div>
      <div class="jnhfxq_2_box" v-for="(item,index) in question" :key="index">
        <p>
          <span>*</span>
          问题{{index+1}}：{{ item.name }}
        </p>
        <div class="jl_beizhu">
          {{ item.ask }}
        </div>
      </div>
    </div>
  </div>
</template>
      <script>
export default {
  data() {
    return {
      id: this.$route.query.id,
      list: {},
      question: [],
      infolist: [],
    };
  },
  mounted() {
    this.getinfo();

  },
  methods: {
    /**
     * 获取列表
     */
    getinfo() {
      let that = this;
      let data = {
        type: 2,
        id: that.id,
      };
      that.$http.post("question/history_ask", data).then((res) => {
        if (res.code === 1) {
          that.list = res.data;
          that.list.ask.forEach((item, index) => {
            let obj = JSON.parse(JSON.stringify(item));
            if (index > 3) {
              that.question.push(obj);
            } else {
              that.infolist.push(obj);
            }
          });
          // console.log(that.question)
        }
      });
    },
    //  ==
  },
};
</script>
      <style>
.jnhfxq_box {
  background: #ffffff;
  border-radius: 0.125rem;
  box-shadow: 1px 1px 3px 2px rgba(0, 0, 0, 0.15);
  margin: 0.125rem 0.025rem 0.1rem 0.625rem;
  padding-bottom: 0.4875rem;
}
.jnhfxq_box_title {
  height: 0.9rem;
  text-align: center;
  line-height: 1rem;
  font-size: 0.25rem;
  font-weight: 400;
  color: #333333;
}
.jnhfxq_nr_box {
  width: 14rem;
  border-top: 0.0375rem dotted #dddd;
  margin: auto;
  font-size: 0.225rem;
  font-weight: 400;
  color: #333333;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.jnhfxq_nr_box_input {
  width: 48%;
  margin-top: 0.25rem;
}
.jnhfxq_nr_box_input .el-input-group__prepend {
  width: 68px;
}
.jnhfxq_2_box {
  width: 14rem;
  margin: 0.15rem auto 0;
  font-size: 0.225rem;
  font-weight: 400;
  color: #333333;
}
.jnhfxq_2_box .el-table__header thead th {
  background-color: #ebf2fc !important;
  height: 0.625rem;
  font-size: 16px;
  font-weight: 400;
  color: #1954a4;
  line-height: 0.375rem;
  text-align: center;
}
.jnhfxq_2_box .el-table__body-wrapper tbody td {
  text-align: center;
}
.jnhfxq_2_box p {
  font-size: 0.2rem;
  font-family: Microsoft YaHei;
  font-weight: 400;
  line-height: 0.375rem;
  margin-bottom: 0.1625rem;
}
.jnhfxq_2_box p span {
  font-size: 0.2rem;
  color: #cd0000;
}
.button_box_hfxq2 .el-button {
  width: 2.5rem;
}
.button_box_hfxq2 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}
.jnhfxq2_pz {
  display: flex;
  align-items: center;
  width: 14rem;
  margin: auto;
  border: 1px solid #e8eaee;
  height: 1.125rem;
}
.jnhfxq2_pz_title {
  width: 1.25rem;
  background: #f2f2f2;
  border-radius: 0.025rem 0px 0px 0.025rem;
  font-size: 0.2rem;
  font-weight: 400;
  color: #333333;
  line-height: 1.125rem;
  text-align: center;
}
.jnhfxq2_pz_upload {
  display: flex;
  align-items: center;
  padding-left: 0.275rem;
  box-sizing: border-box;
}
.jnhfxq2_pz_uploadbox .el-upload--picture-card {
  width: 0.8875rem;
  height: 0.8875rem;
  line-height: 1rem;
  background: #f2f2f2;
}
.jnhfxq2_pz_uploadbox .el-upload--picture-card i {
  font-size: 0.35rem;
}
.uploadpz {
  font-size: 0.175rem;
  font-weight: 400;
  color: #333333;
  margin-left: 0.1375rem;
}
.jnhfxq2_pz_uploadbox .el-upload-list--picture-card .el-upload-list__item {
  width: 0.9rem;
  height: 0.9rem;
}
.dcjl .el-input.is-disabled .el-input__inner {
  background: #ffffff;
  color: #333333;
}
.dcjl {
  margin-bottom: 0.4375rem;
}
.jnhfxq_box .el-input-group__prepend {
  font-size: 0.2rem;
  color: #333333;
}
.jnhfxq_box .el-input__inner {
  font-size: 0.2rem;
  color: #333333;
}
</style>
  <style scoped>
.sex {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
}
.lable_sex {
  width: 110px;
  height: 40px;
  background: #f5f7fa;
  border: 1px solid #dcdfe6;
  font-size: 14px;
  color: #909399;
  display: flex;
  align-items: center;
  padding: 0px 18px;
  box-sizing: border-box;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  flex-shrink: 0;
  flex-grow: 0;
  border-right: none !important;
}
.title {
  font-size: 0.25rem;
  font-weight: 400;
  color: #cd0000;
  line-height: 0.375rem;
  margin-bottom: 0.125rem;
}
.jnhfxq_nr_box {
  padding-top: 0.325rem;
}
.jl_beizhu {
  width: 14rem;
  word-wrap: break-word;
  word-break: break-all;
  border-radius: 2px;
  border: 1px solid #e8eaee;
  padding: 0.175rem 0.3375rem 0.3125rem 0.125rem;
  box-sizing: border-box;
}
</style>